CMAKE_MINIMUM_REQUIRED(VERSION 2.6)

PROJECT(IFT)

FIND_PACKAGE(OpenCV REQUIRED)
FIND_PACKAGE(Qt4 REQUIRED)

INCLUDE(${QT_USE_FILE})

INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/include
					${OPENCV_INCLUDE_DIR})

SET(SRCS 	src/main.cpp
			src/Mainwindow.cpp
			src/read_image.cpp
			src/assist.cpp)
			
SET(MOC_HDRS include/Mainwindow.h)

SET(HDRS 	include/node.h
			include/pixel.h
			include/pixel_array.h
			include/read_image.h
			include/assist.h)
			
QT4_WRAP_CPP(MOC_SRCS ${MOC_HDRS})

SOURCE_GROUP("Generated Files" REGULAR_EXPRESSION /*.cxx$)
SOURCE_GROUP("Header Files" REGULAR_EXPRESSION /*.h$)
SOURCE_GROUP("Resource Files" REGULAR_EXPRESSION /*.qrc$)
SOURCE_GROUP("Source Files" REGULAR_EXPRESSION /*.cpp$)

ADD_EXECUTABLE(IFT ${SRCS} ${HDRS} ${MOC_HDRS} ${MOC_SRCS})

TARGET_LINK_LIBRARIES(IFT 	${OPENCV_LIBRARIES}
							${QT_LIBRARIES})